package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchEnergyAnalysisConfigsMapper;
import com.ruoyi.system.domain.DispatchEnergyAnalysisConfigs;
import com.ruoyi.system.service.IDispatchEnergyAnalysisConfigsService;

/**
 * 能耗分析配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchEnergyAnalysisConfigsServiceImpl implements IDispatchEnergyAnalysisConfigsService 
{
    @Autowired
    private DispatchEnergyAnalysisConfigsMapper dispatchEnergyAnalysisConfigsMapper;

    /**
     * 查询能耗分析配置
     * 
     * @param energyAnalysisConfigsId 能耗分析配置主键
     * @return 能耗分析配置
     */
    @Override
    public DispatchEnergyAnalysisConfigs selectDispatchEnergyAnalysisConfigsByEnergyAnalysisConfigsId(Long energyAnalysisConfigsId)
    {
        return dispatchEnergyAnalysisConfigsMapper.selectDispatchEnergyAnalysisConfigsByEnergyAnalysisConfigsId(energyAnalysisConfigsId);
    }

    /**
     * 查询能耗分析配置列表
     * 
     * @param dispatchEnergyAnalysisConfigs 能耗分析配置
     * @return 能耗分析配置
     */
    @Override
    public List<DispatchEnergyAnalysisConfigs> selectDispatchEnergyAnalysisConfigsList(DispatchEnergyAnalysisConfigs dispatchEnergyAnalysisConfigs)
    {
        return dispatchEnergyAnalysisConfigsMapper.selectDispatchEnergyAnalysisConfigsList(dispatchEnergyAnalysisConfigs);
    }

    /**
     * 新增能耗分析配置
     * 
     * @param dispatchEnergyAnalysisConfigs 能耗分析配置
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchEnergyAnalysisConfigs(DispatchEnergyAnalysisConfigs dispatchEnergyAnalysisConfigs)
    {
        return dispatchEnergyAnalysisConfigsMapper.insertDispatchEnergyAnalysisConfigs(dispatchEnergyAnalysisConfigs);
    }

    /**
     * 修改能耗分析配置
     * 
     * @param dispatchEnergyAnalysisConfigs 能耗分析配置
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchEnergyAnalysisConfigs(DispatchEnergyAnalysisConfigs dispatchEnergyAnalysisConfigs)
    {
        return dispatchEnergyAnalysisConfigsMapper.updateDispatchEnergyAnalysisConfigs(dispatchEnergyAnalysisConfigs);
    }

    /**
     * 批量删除能耗分析配置
     * 
     * @param energyAnalysisConfigsIds 需要删除的能耗分析配置主键
     * @return 结果
     */
    @Override
    public int deleteDispatchEnergyAnalysisConfigsByEnergyAnalysisConfigsIds(Long[] energyAnalysisConfigsIds)
    {
        return dispatchEnergyAnalysisConfigsMapper.deleteDispatchEnergyAnalysisConfigsByEnergyAnalysisConfigsIds(energyAnalysisConfigsIds);
    }

    /**
     * 删除能耗分析配置信息
     * 
     * @param energyAnalysisConfigsId 能耗分析配置主键
     * @return 结果
     */
    @Override
    public int deleteDispatchEnergyAnalysisConfigsByEnergyAnalysisConfigsId(Long energyAnalysisConfigsId)
    {
        return dispatchEnergyAnalysisConfigsMapper.deleteDispatchEnergyAnalysisConfigsByEnergyAnalysisConfigsId(energyAnalysisConfigsId);
    }
}
